<%--
  Created by IntelliJ IDEA.
  User: guoshunw
  Date: 13-9-2
  Time: 上午10:02
--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%--<s:debug />--%>
<table border="0" class="new-request-table">
    <tr>
        <td class="label"><s:text name="request.title"/></td>
        <td><input id="description" name="description"/></td>
    </tr>

    <tr>
        <td class="label"><s:text name="request.desc"/></td>
        <td><textarea id="attr_description" name="attr_description" rows="8"></textarea></td>
    </tr>

    <tr>
        <td class="label"><s:text name="request.version"/></td>
        <td><span>Enterprise_Unscheduled</span></td>
    </tr>

    <tr>
        <td class="label"><s:text name="request.priority"/></td>
        <td>
            <s:select headerKey="" headerValue="%{getText('pleaseSelect')}"
                      required="true" list="priorities" id="attr_Priority" name="attr_Priority"
                      value="attributes.attr_Priority"
                      theme="simple"/>
        </td>
    </tr>

</table>

<script type="text/javascript">

    var requestForm = $('#' + global.NEW_REQUEST_TAB_ID);

    global.getIncludeAttributes = function () {
        var pNames = ['description', 'attr_Priority' , 'attr_description'];
        if(! $("#description", requestForm).val() ){
            $.msgBox($.jgrid.format("[{0}] is required.", 'Title'), null, {title: "Error"});
            return;
        }

        var postDate = global.getAttributes(pNames, ['attr_Priority']);
        return postDate;
    }

</script>
